﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DualPlaneFR4Paster.Migrations
{
    public partial class 添加ZIndex和RIndex : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<int>(
                name: "RIndex",
                table: "XYZRPoints",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "ZIndex",
                table: "XYZRPoints",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.UpdateData(
                table: "XYZRPoints",
                keyColumn: "Id",
                keyValue: 3,
                column: "ZIndex",
                value: 1);

            migrationBuilder.UpdateData(
                table: "XYZRPoints",
                keyColumn: "Id",
                keyValue: 4,
                columns: new[] { "RIndex", "ZIndex" },
                values: new object[] { 1, 2 });

            migrationBuilder.UpdateData(
                table: "XYZRPoints",
                keyColumn: "Id",
                keyValue: 5,
                columns: new[] { "RIndex", "ZIndex" },
                values: new object[] { 1, 3 });

            migrationBuilder.UpdateData(
                table: "XYZRPoints",
                keyColumn: "Id",
                keyValue: 9,
                column: "ZIndex",
                value: 1);

            migrationBuilder.UpdateData(
                table: "XYZRPoints",
                keyColumn: "Id",
                keyValue: 10,
                columns: new[] { "RIndex", "ZIndex" },
                values: new object[] { 1, 2 });

            migrationBuilder.UpdateData(
                table: "XYZRPoints",
                keyColumn: "Id",
                keyValue: 11,
                columns: new[] { "RIndex", "ZIndex" },
                values: new object[] { 1, 3 });

            migrationBuilder.UpdateData(
                table: "XYZRPoints",
                keyColumn: "Id",
                keyValue: 14,
                column: "ZIndex",
                value: 1);

            migrationBuilder.UpdateData(
                table: "XYZRPoints",
                keyColumn: "Id",
                keyValue: 15,
                columns: new[] { "RIndex", "ZIndex" },
                values: new object[] { 1, 2 });

            migrationBuilder.UpdateData(
                table: "XYZRPoints",
                keyColumn: "Id",
                keyValue: 16,
                columns: new[] { "RIndex", "ZIndex" },
                values: new object[] { 1, 3 });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "RIndex",
                table: "XYZRPoints");

            migrationBuilder.DropColumn(
                name: "ZIndex",
                table: "XYZRPoints");
        }
    }
}
